/*
 * @Description:
 * @Version: 1.0
 * @Autor: haozhuang
 * @Date: 2020-04-28 14:34:17
 * @LastEditors: haozhuang
 * @LastEditTime: 2020-05-11 17:33:56
 */
import Mock from 'mockjs'

const data = Mock.mock({
  'data|30': [
    {
      id: '@id',
      title: '@csentence(4,6)',
      name: Mock.Random.cname('108x64'),
      'type|1': ['文档', '文件集', '图片'],
      time: Mock.Random.date('yyyy-MM-dd HH:mm:ss'),
      'imgList|1-5': [Mock.Random.image()]
    }
  ]
})

export default [
  {
    url: '/vue-admin-template/share/list',
    type: 'get',
    response: config => {
      const items = data.data
      return {
        code: 20000,
        data: {
          total: items.length,
          data: items
        }
      }
    }
  }
]
